package cn.com.surker.enums.sale;

import cn.com.surker.enums.ICodeDescEnum;

/**
 * @Author lucky
 * @create 2024年07月25 22:32
 * @desc
 */
public enum BusinessQualityEnum implements ICodeDescEnum {
    ZW(0,"待定"), A1(1,"A1"), A2(2,"A2"),
    B1(3,"B1"), B2(4,"B2"), C(5,"C类"),
    A(6,"A类"), B(7,"B类");

    private final String description;

    private final Integer code;

    BusinessQualityEnum(Integer code, String description) {
        this.description = description;
        this.code = code;
    }

    public String getDescription() {
        return description;
    }

    public Integer getCode() {
        return code;
    }

    public static String getDescription(Integer code) {
        for (BusinessQualityEnum e : values()) {
            if (e.getCode().equals(code)) {
                return e.getDescription();
            }
        }
        return null;
    }
}
